package com.example.test_anno_and_aspect;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

@SpringBootApplication
public class TestAnnoAndAspectApplication {

    private static ConfigurableApplicationContext context;

    public static void main(String[] args) {
        context = SpringApplication.run(TestAnnoAndAspectApplication.class, args);
        System.out.println("--------------项目启动了---------------");
        ConfigurableEnvironment environment = context.getEnvironment();
        String port = environment.getProperty("server.port");
        System.out.println("port:" + port);
        System.out.println("http://localhost:" + port);
        System.out.println("http://localhost:" + port+"/test/testGet");
    }

}
